import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import vant from 'vant'
import 'vant/lib/index.css'
import { Axios } from "axios"
import moment from 'moment'
import qs from 'qs'
import echarts from 'echarts'
import VueSocketIO from 'vue-socket.io'
import SocketIO from 'socket.io-client'

// 原型设置baseurl
// Vue.prototype.$base = 'http://101.43.73.49:3000/'
Vue.prototype.$base = process.env.NODE_ENV === 'production' ? 'http://101.43.73.49:3000/' : 'http://localhost:3000/';
// websocketbaseUrl
Vue.prototype.$base2 = 'ws://101.43.73.49:24000'
Vue.use(vant)
Vue.prototype.axios = axios
Vue.prototype.$qs = qs
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false
Vue.prototype.moment = moment

Vue.use(new VueSocketIO({
  debug: true,
  connection: SocketIO('ws://101.43.73.49:24000')
}));

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
